package studentinformationmanagementsystem.entity;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author 苗庆
 * @version 1.0
 * 专业实体类对象
 */
public class Major implements Serializable {
    private static final long serialVersionUID = 1L;

    //专业id
    private Integer majorid;

    //专业
    private String major;

    //专业简介
    private String majorction;

    public Major() {

    }

    public Major(Integer majorid, String major, String majorction) {
        this.majorid = majorid;
        this.major = major;
        this.majorction = majorction;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Major major = (Major) o;
        return majorid.equals(major.majorid);
    }

    @Override
    public int hashCode() {
        return Objects.hash(majorid);
    }

    @Override
    public String toString() {
        return "Major{" +
                "majorid=" + majorid +
                ", major='" + major + '\'' +
                ", majorction='" + majorction + '\'' +
                '}';
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Integer getMajorid() {
        return majorid;
    }

    public void setMajorid(Integer majorid) {
        this.majorid = majorid;
    }

    public String getMajor() {
        return major;
    }

    public void setMajor(String major) {
        this.major = major;
    }

    public String getMajorction() {
        return majorction;
    }

    public void setMajorction(String majorction) {
        this.majorction = majorction;
    }
}
